package com.caifu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.caifu.bean.Result;
import com.caifu.excel.ExcelMedicine;
import com.caifu.pojo.SysUser;
import com.caifu.pojo.YlFloor;
import com.caifu.pojo.YlUserMedicine;
import com.caifu.vo.YlUserMedicineVo;
import net.sf.json.JSONObject;

import java.util.List;

/**
 * ClassName: YlUserMedicineService.java
 *
 * @author: tianwenwen
 * createTime: 2020年11月11日 13:37:02
 **/
public interface YlUserMedicineService {
    /**
     * description: 添加药物
     * param ylUserMedicine
     * return: com.caifu.bean.Result
     * author: Tian
     * time: 2020/11/12 9:33
     */
    Result addUserMedicine(YlUserMedicine ylUserMedicine, SysUser user);

    /**
     * description: 根据id获取药物信息
     * param id
     * return: com.caifu.pojo.YlUserMedicine
     * author: Tian
     * time: 2020/11/12 10:08
     */
    YlUserMedicine getUserMedicineById(String id);

    /**
     * description: 根据老人ID查询老人药物库
     * param userNo
     * return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.caifu.pojo.YlUserMedicine>
     * author: Tian
     * time: 2020/11/12 10:31
     */
    IPage<YlUserMedicine> getUserMedicineByUserNo(String userNo, Long currentPage, Long pageSize);

    /**
     * description:  根据id删除药物
     * param id
     * return: void
     * author: Tian
     * time: 2020/11/12 10:48
     */
    void deleteById(String id);

    /**
     * description: 获取用量预警、有效期预警
     * param
     * return: java.util.List<java.util.List<com.caifu.vo.YlUserMedicineVo>>
     * author: Tian
     * time: 2020/11/16 10:40
     */
    List<List<YlUserMedicineVo>> getWarningList(String flag, String pensionNo);

    /**
     * description: 通过楼栋号获取楼层
     * param buildNo
     * return: java.util.List<com.caifu.pojo.YlFloor>
     * author: Tian
     * time: 2020/11/16 17:17
     */
    List<YlFloor> getFloor(String buildNo);

    /**
     * description: 获取页面导出数据
     * param userNo
     * return: java.util.List<com.caifu.excel.ExcelMedicine>
     * author: Tian
     * time: 2020/11/20 10:30
     */
    List<ExcelMedicine> getExcelData(String userNo);
    /**
    * 
    * 功能描述：查询所有药物预警信息
    * 
    * @Param type 1 用量预警 2 有效期预警  pensionNo:养老机构编号
    * @Return      
    * @Exception   
    * @Author  GZ
    * @Date   2020/11/29 13:20
    */
    JSONObject queryAllMedicineAlertData(String type, String pensionNo) throws Exception;
}
